<?php $this->load->view('headerfooter/header'); ?>
 <!-- Begin page content -->
<div class="container">
	<div class="col-sm-10 col-sm-offset-1">
        <div class="panel panel-success">
			<div class="panel-heading">
				<div class="panel-title"><?=$title?></div>
			</div>
			<div class="panel-isi" id="">
			<?php foreach ($hasil->result() as $row) :?>
			<table class="table">
				<tr>
					<td>ID</td>
					<td><?=$row->idloginuser?></td>
				</tr>
				<tr>
					<td>Username</td>
					<td><?=$row->nama_user?></td>
				</tr>
				<form action="<?=site_url('user/ubah_role')?>" method="post">
					<input type="hidden" name="id" value="<?=$row->idloginuser?>">
				<tr>
					<td>Role</td>
					<td>
						<select name="role" class="form-control">
							<option value="1" <?php if($row->role == 1) echo "selected"?>>Master Admin</option>
							<option value="2" <?php if($row->role == 2) echo "selected"?>>Editor</option>
							<option value="3" <?php if($row->role == 3) echo "selected"?>>User</option>
						</select>
					</td>
				</tr>
				<tr>
					<td colspan="2"><button type="submit" class="btn btn-success btn-lg btn-block"><i class="fa fa-pencil"></i> Ubah Role</button></td>
				</tr>
				</form>
			</table>
			<?php endforeach; ?>
			</div>
		</div>
	</div>
</div>
<?php $this->load->view('headerfooter/footer'); ?>